#!/bin/bash

# 进入 src 目录
cd ~/shangweiji/src

# 定义要拉取的仓库列表
repos=(
    "robot_app"
    "robot_common"
    "robot_map"
    "robot_msgs"
    "robot_auto_drill"
    "robot_common"
)

# 遍历所有仓库并执行 git pull
for repo in "${repos[@]}"; do
    echo "Pulling $repo..."
    cd "$repo" || { echo "Failed to enter $repo"; exit 1; }
    git pull
    cd ..  # 返回上级目录
    echo "----------------------------------"
done

echo "All repositories updated!"

